import * as types from "../mutation-types";
const state = {
  isLoggedIn: false,
  user:{
    id:0,
    account:'',
    name:'',
    psw:'',
  }
};

const mutations = {
  [types.LOGGEDIN](state) {
    state.isLoggedIn = true;
  },
  [types.LOGGINGIN](state) {
    state.isLoggedIn = false;
  },
  [types.SET_USER](state, payload) {
    state.user = payload;
  }
};

export default {
  state,
  mutations
};
